package com.joint.cloud.common.utils;

import com.joint.cloud.common.exception.AIOpsException;
import com.joint.cloud.common.exception.msg.NullParameterExceptionErrorMsg;

/**
 * @author lilengyi
 * @date 2020/1/3 14:58
 */
public class ValidatorUtil {

    /**
     * 参数校验，判断是否为空
     *
     * @param param
     * @param paramName
     */
    public static void paramNotNull(Object param, String paramName) {
        if (param == null) {
            throw new AIOpsException(
                    new NullParameterExceptionErrorMsg(paramName));
        }
    }
}
